this.name = "rmb-chaff-launcher-script.js";
this.author = "Ramirez";
this.copyright = "January 2009";
this.description = "Ship script for the chaff launcher";
this.version = "1.0";


this.decrementChaff = function() // when chaff is released by the launcher, decrement the chaff count and reload if bundles are available

	
	{	missionVariables.rmb_chaff_count = (--missionVariables.rmb_chaff_count)
	
		if
			(missionVariables.rmb_chaff_count > 0)
		
				{	player.ship.awardEquipment("EQ_RMB_CHAFF_MINE")
					player.consoleMessage(expandDescription("Chaff reloaded.  You have " + [missionVariables.rmb_chaff_count] + " bundle(s) remaining."), 6)
					missionVariables.rmb_chaff_loaded = "YES"
				}
	
	
		if
	
			(missionVariables.rmb_chaff_count == 0)
			player.consoleMessage(expandDescription("Chaff exhausted."), 6)
			missionVariables.rmb_chaff_loaded = "NO"
		
	
	
	}

	
	

